Skip to content

JimmyW93/0day-rce-september-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

0day-rce-september-2022

CVE identifiers:

  • CVE-2022-41040
  • CVE-2022-41082

Very crude and quickly written scripts to scan if there are any webshells on your Exchange server related to the 0day RCE as mentioned here:

0day-rce-detection.ps1 checks if the files exist and if they do, check if their hashes match the currently known IOCs.

scan-logs.ps1 check the IIS logs for any mention of 'powershell.*autodiscover\.json.*\@.*200'.

Microsoft also recommends disabling remote PowerShell for non-admin users:

Which can be done fairly quickly using the following examples:

This disables remote PowerShell for all users except the admin:

$DSA = Get-User -ResultSize Unlimited -Filter "(Name -NotLike '*Administrator*')"
$DSA | foreach { Set-User -Identity $_ -RemotePowerShellEnabled $false }

If you want to check if it worked, you can check which accounts still have remote PowerShell enabled (or disabled by changing setting the parameter to false):

Get-User -ResultSize Unlimited -Filter 'RemotePowerShellEnabled -eq $true'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks